<h2>Facebook Module</h2>
<p>
	<strong>Created by:</strong> DB & Yankidank<br />
	<strong>Requires:</strong> Pligg 2.0.0 or above and a Facebook account with API access.
</p>

<h3>Description</h3>
<p>The Facebook Module lets users login using their Facebook credentials and post stories to their Facebook Wall. Users now have a simple way to promote their stories on your website.</p>
<p>Existing users can use the Facebook module to link their account to Facebook. New members need to fill in some new account registration details and are then able to login to Pligg using their Facebook credentials. Once they are logged in using Facebook Connect they can post stories to their Facebook wall by following directions during the story submission process.</p>
<p>See the <a href="http://pligg.com/shop/module/facebook-connect-module/" target="_blank">Facebook module homepage</a> for more information</p>

<h3>Installation</h3>
<p>Please follow the directions below carefully to prevent any problems when setting up this module.</p>

<h4>For Facebook</h4>
<ol>
	<li>Go to <a href="https://developers.facebook.com/apps" target="_blank">https://developers.facebook.com/apps</a> to register a new Facebook Application.</li>
	<li>If you haven't already, you will <a href="https://developers.facebook.com/blog/post/386/">need to verify your identity</a> with Facebook by providing them with a phone number or credit card. They will send a confirmation code text if you choose the mobile device option. Facebook will not charge your credit card if you add it.</li>
	<li>Enter an Application Name for your website to use. Agree to the terms, and click on the "Create App" button.</li>
	<li>Click on the "Website" tab on the left side of the page.</li>
	<li>Enter a "Site URL" value. This would be the URL used for your Pligg homepage. For example the site http://www.pligg.com/demo/ would use the value "http://www.pligg.com/demo/" (without the quotes of course).</li>
	<li>Enter a "Site Domain" value. This is root domain for your website. For the example site http://www.pligg.com/demo/ I have set it to "pligg.com".  You can also use the value "www.pligg.com" if you want the connect module to only work on "www." URLs on your site.</li>
	<li>Click on the "Save Changes" button.</li>
	<li>Your site registration on Facebook.com is now complete. Navigate back to the <a href="https://developers.facebook.com/apps">Apps</a> page so that you can copy the API Key and Secret values. You will be using these values in a minute to configure the Pligg module.</li>
</ol>

<h4>For Pligg</h4>
<ol>
	<li>Upload the Facebook module (located in the "fb" folder) to your Pligg /modules directory.</li>
	<li>Navigate to the Uninstalled Module page (Admin > Modules > Uninstalled) from the Pligg Admin Panel. Find the Facebook module and click on the install button.</li>
	<li>Navigate to the Installed Modules page and click on the Settings link for the Facebook module, or click on the "Facebook Module" tab near the top of the Pligg Admin Panel.</li>
	<li>Insert your Facebook API and Facebook Secret keys into the appropriate fields.</li>
	<li>Optional Fix for IE7. Open your pligg.tpl template file and find:<br />
		<pre>&lt;html class="no-js" dir="{#PLIGG_Visual_Language_Direction#}" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;</pre>
		Replace it with:<br />
		<pre>&lt;html class="no-js" dir="{#PLIGG_Visual_Language_Direction#}" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en"&gt;</pre>
	</li>
</ol>

<h4>Other Notes</h4>
<p>If you want to change the Facebook registration page, edit the /modules/fb/templates/fb_step2.tpl file. We recommend copying customized module template files to your local template file directory to prevent writing over it when module updates become available. To do this, copy the file to /templates/YOUR-TEMPLATE/modules/fb/fb_step2.tpl. This will override the default module template file.</p>

<h3>Revision History</h3>
<ul>
	<li>v4.7 September 18, 2013 - Tested on 2.0.0 official release. Added Facebook connect button to registration page.</li>
	<li>v4.6 July 2, 2013 - Preparing for 2.0 release</li>
	<li>v4.5 May 15, 2013 - Improved the design of the Facebook login button.</li>
	<li>v4.3 February 12, 2013 - Updated for Facebook API changes.</li>
	<li>v4.2 July 5, 2012 - Added feature to submit story to Facebook wall through a story tools link. Changed javascript to work with Pligg 2.0.</li>
	<li>v4.0 - Update required to match new Facebook API.</li>
	<li>v3.8 May 18, 2011 - Fix related to when users disconnect their accounts. Allows them to generate a password via email.</li>
	<li>v3.7 October 27, 2011 - Openend PHP file with long &lt;?php tag in fb.php.</li>
	<li>v3.6 October 8, 2011 - Added missing disconnect language line so that the button displays correctly on the modify profile page.</li>
	<li>v3.5 September 19, 2011 - Allow users to disconnect from Facebook account</li>
	<li>v3.3 July 8, 2011 - Logging out of site no longer logs you out of Facebook.</li>
	<li>v3.2 July 5, 2011 - Removed CAPTCHA and email validation options from admin panel, since we no longer make use of those options. Module now imports user email addresses from Facebook.</li>
	<li>v3.0 June 21, 2011 - Complete rewrite and update to new Facebook API version. Changed the required information during user registration to make things a lot easier to create a new account.</li>
	<li>v2.3 August 15, 2010 Yankidank - Changed language item for step 3 submission checkbox. Fixed module, because it stopped working a week ago for no apparent reason.</li>
	<li>v2.0 April 27, 2010 DB -  Removed the "Post to my Facebook Wall" checkbox for users who are not logged in to a Facebook-associated account.</li>
	<li>v1.9 April 26, 2010 DB and Yankidank -  Fixed a bug related to the language file location. Also added advanced directions to the readme file.</li>
	<li>v1.8 April 15, 2010 DB -  Fixed a bug that was stopping the module from being able to publish to a Facebook wall on PHP4 servers.</li>
	<li>v1.7 April 6, 2010 DB - Fixed a problem with module working in conjunction with the vBulletin login module.</li>
	<li>v1.6 April 1, 2010 DB - Fixed a problem with other modules displaying a language file error message on the Facebook login page.</li>
	<li>v1.5 2009/17/02 DB - Fixes and removed Facebook message from submit step 1 if you are not logged into a Facebook connected account.</li>
	<li>v1.4<br />
	<ul><li>Fixed CAPTCHA disable option</li>
		<li>Fixed Email Validation disable option</li>
		<li>Fix for Firefox not showing the login button on some browsers.</li>
	</ul>
	</li>
	<li>v1.3 - This version should only be used with Pligg 1.0.4 and above.</li>
	<li>v1.2 - Fix for longer user Facebook IDs. If you are upgrading, please change the varchar value for the user_fb field (under pligg_users) to 255 characters.</li>
	<li>v1.1 <br />
	<ul><li>Added checkbox to the admin panel that lets you enable/disable CAPTCHA requirement for Facebook users</li>
		<li>Added checkbox to the admin panel that lets you enable/disable email verification requirement for FB users</li>
		<li>Changed save message style in admin panel</li>
	</ul>
	</li>
	<li>v0.10 2009/12/01 DB - First version</li>
</ul>
